<!-- 首页 -->
<template>
	<view class="container">
		<view class="c-module">
			<StudentModule :info="studentInfo"></StudentModule>
		</view>
		<view class="m-btn">
			<view class="btn-block">
				<u-button type="primary" text="修改信息" @click="navigateTo('studentEditInfo?type=update')"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
	import StudentModule from "@/pages/pages_mine/components/StudentModule.vue"
	export default {
		name: "",
		components: {
			StudentModule
		},
		data() {
			return {

				// 用户身份
				status: this.$store.state.status,
				// 学生信息
				studentInfo: {}
			}
		},
		onShow() {
			this.getStudentInfo()
		},
		methods: {
			// 获取学生信息
			getStudentInfo() {
				this.$http.getStudentInfo().then(res => {
					this.studentInfo = res
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.container {
		.m-btn{
			margin-top: 20rpx;
		}
	}
</style>
